package com.kuaidi100.sdk.response;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * @Author: api.kuaidi100.com
 * @Date: 2020-07-17 19:29
 */
public class PrintHtmlResp {

    private String taskId;

    private String message;

    private String status;

    private boolean result;

    private List<PrintHtmlData> data;

    @Override
    public String toString() {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsString(this);
        } catch (Exception e) {
            return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                    .append("taskId", taskId)
                    .append("message", message)
                    .append("status", status)
                    .append("result", result)
                    .append("data", data)
                    .toString();
        }
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public List<PrintHtmlData> getData() {
        return data;
    }

    public void setData(List<PrintHtmlData> data) {
        this.data = data;
    }
}
